package BasicClient;

public class PokerPlayer {

	private int seatNumber;
	private int stackSize;
	private int investedInhand;
	private boolean inHand;
	private Status status;
	
	public PokerPlayer(int seatNumber, int stackSize){
		this.seatNumber = seatNumber;
		this.stackSize = stackSize;
		this.investedInhand = 0;
		this.inHand = false;
		this.status = Status.Connected;
	}
	
	//--------------------------------------------------------
	// Section for interacting with the players seat
	//--------------------------------------------------------
	public int getSeatNumber(){
		return this.seatNumber;		
	}
	
	public void setSeatNumber(int seat){
		this.seatNumber = seat;
	}
	
	//--------------------------------------------------------
	// Section for interacting with the current hand status
	//--------------------------------------------------------
	
	public boolean isInHand(){
		return inHand;
	}
		
	public void fold(){
		inHand = false;
	}
	
	//--------------------------------------------------------
	// Section for interacting with the chip stack
	//--------------------------------------------------------
	
	public int getStackSize(){
		return stackSize;
	}
	
	
	public void increaseStackSize(int amount){
		//check for integer overflow here
		this.stackSize += amount;
	}
	
	public void decreaseStackSize(int amount){
		// check if stack is big enough to remove this amount
		// check for integer underflow
		this.stackSize -= amount;
	}
	
	//--------------------------------------------------------
	// Misc
	//--------------------------------------------------------
	
	public int getAmountInvestedInHand(){
		return investedInhand;
	}
	
	public void addAmountInvestedInhand(int amount){
		this.investedInhand += amount;
	}
	
	public void newHand(){
		investedInhand = 0;
		inHand = true;
	}
	
	public void setConnectedStatus(Status s){
		this.status = s;
	}
	
	public Status getConnectedStatus(){
		return this.status;
	}
	
	
	
}
